import { createRouter, createWebHistory } from 'vue-router'
import Layout from '../layout/Layout.vue'

const routes = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect: "/Get",
    children: [
      {
        path: '/user',
        name: 'User',
        component: ()=>import("@/views/User")
      },
      {
        path: 'aside',
        name: 'Aside',
        component: () => import("@/components/Aside"),
      },

      {
        path: '/get',
        name: 'Get',
        component: ()=>import("@/views/Get")
      },
      {
        path: '/post',
        name: 'Post',
        component: ()=>import("@/views/Post")
      },
      {
        path: '/result',
        name: 'Result',
        component: ()=>import("@/views/Result")
      },
      {
        path: '/result_post',
        name: 'Result_post',
        component: ()=>import("@/views/Result_post")
      },
      {
        path: '/project',
        name: 'project',
        component: ()=>import("@/views/project")
      },
      {
        path: '/report',
        name: 'report',
        component: ()=>import("@/views/report")
      },
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: ()=>import("@/views/Login")
  },
  {
    path: '/register',
    name: 'Register',
    component: ()=>import("@/views/Register")
  },
  {
    path: '/person',
    name: 'Person',
    component: ()=>import("@/views/Person")
  },
  {
    path: '/news',
    name: 'News',
    component: ()=>import("@/views/News")
  },
  // {
  //   path: '/testcase',
  //   name: 'TestCase',
  //   component: ()=>import("@/views/TestCase")
  // }

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
